<script setup lang="ts">
import { ref,reactive } from "vue";
import { invoke } from "@tauri-apps/api/tauri";
const form = reactive({
  name: '',
  region: '',
  date1: '',
  date2: '',
  delivery: false,
  type: [],
  resource: '',
  desc: '',
})
const greetMsg = ref("");
// const name = ref("");

async function greet() {
  // Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
  greetMsg.value = await invoke("greet1", { name: form.name });
}
</script>
<template>

    <el-form :model="form" label-width="120px">
      <el-form-item label="Activity name">
        <el-input v-model="form.name" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="greet">Create</el-button>
        <el-button>Cancel</el-button>
      </el-form-item>
    </el-form>
    <p>{{ greetMsg }}</p>

</template>
 
<style>

</style>
